<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>韩城市综合行政执法局业务审批管理系统</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.7 -->
    <link rel="stylesheet" href="__ADMIN__/bower_components/bootstrap/dist/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="__ADMIN__/bower_components/font-awesome/css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="__ADMIN__/bower_components/Ionicons/css/ionicons.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="__ADMIN__/dist/css/AdminLTE.min.css">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" href="__ADMIN__/dist/css/skins/_all-skins.min.css">
    <!-- Morris chart -->
    <link rel="stylesheet" href="__ADMIN__/bower_components/morris.js/morris.css">
    <!-- jvectormap -->
    <link rel="stylesheet" href="__ADMIN__/bower_components/jvectormap/jquery-jvectormap.css">
    <!-- Date Picker -->
    <link rel="stylesheet" href="__ADMIN__/bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css">
    <!-- Daterange picker -->
    <link rel="stylesheet" href="__ADMIN__/bower_components/bootstrap-daterangepicker/daterangepicker.css">
    <!-- bootstrap wysihtml5 - text editor -->
    <link rel="stylesheet" href="__ADMIN__/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

    <!-- 引入百度编辑器 -->
    <script src="__PLUS__/ueditor/ueditor.config.js"></script>
    <script src="__PLUS__/ueditor/ueditor.all.min.js"></script>
    <script src="__PLUS__/ueditor/lang/zh-cn/zh-cn.js"></script>

    <!-- 自定义样式 -->
    <link rel="stylesheet" href="__ADMIN__/css/style.css">
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

    <!-- 头部 -->
    {include file="common/header"}
    <!-- //头部 -->

    <!-- 左侧导航 -->
    {include file="common/left"}
    <!-- /左侧导航 -->

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper" style="overflow: hidden;">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                修改用户组

            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 系统</a></li>
                <li class="active">系统设置</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="box box-default">

                <!-- /.box-header -->
                <div class="box-body">
                    <div class="col-md-12">
                        <form class="form-horizontal" action="" method="post" enctype="multipart/form-data" >
                            <input type="hidden" name="id" value="{$authgroups.id}" />
                            <div class="box-body">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">用户组名称</label>

                                    <div class="col-sm-8">
                                        <input  class="form-control" name="title" value="{$authgroups.title}" id="title" >
                                    </div>
                                </div>
                                <div class="form-group hidden">
                                    <label class="col-sm-3 control-label">启用状态</label>

                                    <div class="col-sm-9">
                                        <label>
                                            <input class="checkbox-slider toggle colored-blue" value="1" name="statues" id="status" type="checkbox">
                                            <span class="text"></span>
                                        </label>
                                    </div>
                                </div>
                                <div class="form-group">


                                    <div class="col-sm-12">
                                        <div class="box box-danger">
                                            <div class=" with-border">
                                                <h5 class="box-title" style="text-indent: 32px; font-weight: bold;">配置权限</h5>
                                            </div>
                                            <div class="box-body">
                                                <table class="table table-condensed">
                                                    <tbody>
                                                    {volist name="authRuleRes" id="vo"}
                                                    <tr>

                                                        <td>
                                                            <div class="form-group" id="rules">
                                                                <label class="">
                                                                    <?php echo str_repeat('&nbsp;',$vo['level']*4)?><input dataid="id-{$vo['dataid']}" class="checkbox-parent {if condition="$vo['level'] neq 0"}checkbox-child{/if}"  name="rules[]" <?php $arr=explode(',', $authgroups['rules']); if(in_array($vo['id'], $arr)){echo 'checked="checked"';} ?> id="rules" type="checkbox" value="{$vo.id}" />
                                                                </label>
                                                                <span {if condition="$vo['level'] eq 0"}style="font-weight:bold;"{/if}>{$vo.title}</span>

                                                            </div>

                                                        </td>


                                                    </tr>
                                                    {/volist}
                                                    </tbody></table>


                                                <!-- /.box-body -->
                                            </div>
                                        </div>
                                    </div>







                                </div>
                                <!-- /.box-body -->
                                <div class="box-footer text-center">

                                    <button type="submit" class="btn btn-info adduser" id="adduser" data-id="">提交</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <button type="reset" class="btn btn-default ">取消</button>

                                </div>
                                <!-- /.box-footer -->


                            </div>

                        </form>
                    </div>
                    <div class="col-md-4">

                    </div>
                </div>
                <!-- /.row -->
            </div>
            <!-- /.box-body -->
            <div class="box-footer">

            </div>
    </div>

    </section>
    <!-- /.content -->
</div>
<!-- /.content-wrapper -->

<!-- 底部 -->
{include file="common/footer"}
<!-- /底部 -->


</div>
<!-- ./wrapper -->

<!-- jQuery 3 -->
<script src="__ADMIN__/bower_components/jquery/dist/jquery.min.js"></script>
<!-- jQuery UI 1.11.4 -__ADMIN__/->
<script src="bower_components/jquery-ui/jquery-ui.min.js"></script>
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<!-- Bootstrap 3.3.7 -->
<script src="__ADMIN__/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- Morris.js charts -->
<script src="__ADMIN__/bower_components/raphael/raphael.min.js"></script>
<script src="__ADMIN__/bower_components/morris.js/morris.min.js"></script>
<!-- Sparkline -->
<script src="__ADMIN__/bower_components/jquery-sparkline/dist/jquery.sparkline.min.js"></script>
<!-- jvectormap -->
<script src="__ADMIN__/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
<script src="__ADMIN__/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
<!-- jQuery Knob Chart -->
<script src="__ADMIN__/bower_components/jquery-knob/dist/jquery.knob.min.js"></script>
<!-- daterangepicker -->
<script src="__ADMIN__/bower_components/moment/min/moment.min.js"></script>
<script src="__ADMIN__/bower_components/bootstrap-daterangepicker/daterangepicker.js"></script>
<!-- datepicker -->
<script src="__ADMIN__/bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script>
<!-- Bootstrap WYSIHTML5 -->
<script src="__ADMIN__/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
<!-- Slimscroll -->
<script src="__ADMIN__/bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="__ADMIN__/bower_components/fastclick/lib/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="__ADMIN__/dist/js/adminlte.min.js"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<script src="__ADMIN__/dist/js/pages/dashboard.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="__ADMIN__/dist/js/demo.js"></script>
<script type="text/javascript">
    /* 权限配置 */
    $(function () {
        //动态选择框，上下级选中状态变化
        $('input.checkbox-parent').on('change', function () {
            var dataid = $(this).attr("dataid");
            $('input[dataid^=' + dataid + ']').prop('checked', $(this).is(':checked'));
        });
        $('input.checkbox-child').on('change', function () {
            var dataid = $(this).attr("dataid");
            dataid = dataid.substring(0, dataid.lastIndexOf("-"));
            var parent = $('input[dataid=' + dataid + ']');
            if ($(this).is(':checked')) {
                parent.prop('checked', true);
                //循环到顶级
                while (dataid.lastIndexOf("-") != 2) {
                    dataid = dataid.substring(0, dataid.lastIndexOf("-"));
                    parent = $('input[dataid=' + dataid + ']');
                    parent.prop('checked', true);
                }
            } else {
                //父级
                if ($('input[dataid^=' + dataid + '-]:checked').length == 0) {
                    parent.prop('checked', false);
                    //循环到顶级
                    while (dataid.lastIndexOf("-") != 2) {
                        dataid = dataid.substring(0, dataid.lastIndexOf("-"));
                        parent = $('input[dataid=' + dataid + ']');
                        if ($('input[dataid^=' + dataid + '-]:checked').length == 0) {
                            parent.prop('checked', false);
                        }
                    }
                }
            }
        });
    });
</script>
</body>
</html>
